<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>今日竞赛</title>
    <link rel="stylesheet" href="../css/style.default.css" type="text/css"/>
    <script type="text/javascript" src="../js/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="../js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../js/jquery.alerts.js"></script>
    <script type="text/javascript" src="../js/jquery.uniform.min.js"></script>
    <script type="text/javascript" src="../js/general.js"></script>
    <script type="text/javascript" src="../js/blog.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>

    <!--[if lte IE 8]>
    <script language="javascript" type="text/javascript" src="../js/plugins/excanvas.min.js"></script><![endif]-->
    <!--[if IE 9]>
    <link rel="stylesheet" media="screen" href="../css/style.ie9.css"/>
    <![endif]-->
    <!--[if IE 8]>
    <link rel="stylesheet" media="screen" href="../css/style.ie8.css"/>
    <![endif]-->
    <!--[if lt IE 9]>
    <!--script src="../js/plugins/css3-mediaqueries.js"-->
    <link rel="stylesheet" media="screen" href="../css/time.css"/>

    <script src="../js/todayExam.js"></script>
    <script src="../js/change.js"></script>

    <script>
        var intDiff = parseInt(7200);//倒计时总秒数量
        function timer(intDiff){
            window.setInterval(function(){
                var day=0,
                    hour=0,
                    minute=0,
                    second=0;//时间默认值
                if(intDiff > 0){
                    day = Math.floor(intDiff / (60 * 60 * 24));
                    hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
                    minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
                    second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
                }
                if (minute <= 9) minute = '0' + minute;
                if (second <= 9) second = '0' + second;
                $('#day_show').html(day+"天");
                $('#hour_show').html('<s id="h"></s>'+hour+'时');
                $('#minute_show').html('<s></s>'+minute+'分');
                $('#second_show').html('<s></s>'+second+'秒');
                intDiff--;
            }, 1000);
        }
        $(function(){
            timer(intDiff);
        });
    </script>


</head>

<body class="withvernav">
<div class="bodywrapper">
    <div class="topheader">
        <div class="left">
            <h1 class="logo"><span>ZZTY</span></h1>
            <span class="slogan">自在天原学习系统</span>


            <br clear="all"/>

        </div><!--left-->
        <% User user = (User) session.getAttribute("user");
        %>
        <div class="right">
            <!--<div class="notification">
                <a class="count" href="ajax/notifications.html"><span>9</span></a>
            </div>-->
            <div class="userinfo">
                <img src="../images/thumbs/avatar.png" alt=""/>
                <span><%=user.getName()%></span>
            </div><!--userinfo-->

            <div class="userinfodrop">
                <div class="avatar">
                    <a href=""><img src="../images/thumbs/avatarbig.png" alt=""/></a>
                </div><!--avatar-->
                <div class="userdata">

                    <ul>
                        <li>名字:<%=user.getName()%>
                        </li>
                        <li>班级:java<%=user.getClassId()%>班</li>
                        <li>邮箱:<%=user.getEmail()%>
                        </li>
                        <li>类型:<%=user.getType()%>
                        </li>
                        <li><a href="change.jsp">修改信息</a></li>
                        <li><a href="../login.jsp">退出</a></li>
                    </ul>
                </div><!--userdata-->
            </div><!--userinfodrop-->
        </div><!--right-->
    </div><!--topheader-->


    <div class="header">
        <ul class="headermenu">
            <li><a href="Smain.jsp"><span class="icon icon-flatscreen"></span>首页</a></li>
            <li><a href="todayTeamExam.jsp"><span class="icon icon-pencil"></span>结对</a></li>
            <li class="current"><a href="todayExam.jsp"><span class="icon icon-message"></span>竞赛</a></li>
            <li><a href="share1.jsp"><span class="icon icon-chart"></span>课堂分享</a></li>
        </ul>


    </div><!--header-->

    <div class="vernav">
        <ul>
            <li class="current"><a href="todayExam.jsp" class="editor">今日竞赛</a></li>
            <li><a href="historyQuestion.jsp">历史题目</a></li>
            <li><a href="myCode.jsp">我的代码</a></li>

        </ul>
        <a class="togglemenu"></a>
    </div><!--leftmenu-->

    <div class="centercontent">

        <div class="pageheader">
            <h1 class="pagetitle">今日竞赛</h1>


        </div><!--pageheader-->

        <div id="contentwrapper" class="contentwrapper">
            <!--add you page at here-->
            <!--add you page at here-->

            <!--提交作业用这个-->
            <li id="date">开始时间:00:00:00</li>
            <li id="mytime">已用时间:00:00:00</li>
            <h1>倒计时</h1>
            <div class="time-item">
                <span id="day_show">0天</span>
                <strong id="hour_show">0时</strong>
                <strong id="minute_show">0分</strong>
                <strong id="second_show">0秒</strong>
            </div>


            <li>今日作业：
                <div>
                        <textarea id="questions" name="elm1" rows="15" cols="80" style="width: 80%" class="tinymce">
                        </textarea>
                </div>
            </li>


            <div class="two_third">

                <br/>
                <div id="divSub">
                    <h1>文件上传</h1>
                    <form action="../file/fileUpload" method="post" enctype="multipart/form-data">
                        <p>选择文件: <input type="file" name="fileName"/></p>
                        <p><input type="submit" value="提交"/></p>
                    </form>
                </div>
                <div id="divMessage" style="display: none">
                    <p>今日竞赛已提交！</p>
                </div>
            </div><!--two_third-->

        </div><!--contentwrapper-->

        <br clear="all"/>

    </div><!-- centercontent -->


</div><!--bodywrapper-->

</body>
</html>
